package com.czp.infosharingplatformapp.service;

import com.czp.infosharingplatformapp.model.Post;
import com.czp.infosharingplatformapp.model.PostTag;
import com.czp.infosharingplatformapp.dto.PostResponse;

import java.util.List;

public interface PostService {
    Post createPost(String title, String content, Long userId, Long categoryId, Long resourceId, List<PostTag> tags);
    List<Post> getAllPosts(); // 查询所有帖子
    void deletePost(Long postId);
    List<Post> filterPostsByCategory(Long categoryId);
    List<Post> searchPosts(String keyword);
    Post getPostById(Long id);
    PostResponse convertToPostResponse(Post post);
}